package org.apache.dubbo.demo.provider;

import java.io.IOException;

public class EscapeDemo {

    class Person
    {
        private String name;
        private int age;

        public String getName()
        {
            return name;
        }

        public void setName(String name)
        {
            this.name = name;
        }

        public int getAge()
        {
            return age;
        }

        public void setAge(int age)
        {
            this.age = age;
        }
    }

    public void escapeTest(){
        for(int i = 0 ; i < 10000000 ; i++){
            Person person = new Person();
            person.setAge(i);
        }
    }

    public static void main(String[] args)
            throws IOException
    {
        long startTime = System.currentTimeMillis();
        new EscapeDemo().escapeTest();
        long endTime = System.currentTimeMillis();
        System.out.println("elapsed time = "+ (endTime - startTime));
        //System.in.read();
    }

}
